setImmediate(()=>{
    console.log("阶段3Immediate,Immediate回调1")
})
setImmediate(()=>{
    console.log("阶段3Immediate,Immediate回调2")
})
setImmediate(()=>{
    console.log("阶段3Immediate,Immediate回调3")
})

setTimeout(() => {
    console.log("阶段1...定时器,定时器回调1")
}, 0);
setTimeout(() => {
    console.log("阶段1...定时器,定时器回调2");
    process.nextTick(()=>{
        console.log("带切入下一阶段 next回调5")
    })
}, 0);
setTimeout(() => {
    console.log("阶段1...定时器,定时器回调3")
}, 0);
setTimeout(() => {
    console.log("阶段1...定时器,定时器回调4")
}, 0);

process.nextTick(()=>{
    console.log("带切入下一阶段 next回调1")
})
process.nextTick(()=>{
    console.log("带切入下一阶段 next回调2")
    process.nextTick(()=>{
        console.log("带切入下一阶段 next回调4")
    })
})
process.nextTick(()=>{
    console.log("带切入下一阶段 next回调3")
    Promise.resolve().then(()=>{
        console.log("promise回调2")
    })
})

Promise.resolve().then(()=>{
    console.log("promise回调1")
})
